package com.ys.service.eKnowAi.impl;

import com.ys.entity.eKnowAi.EKnowKnowledgeBase;
import com.ys.mapper.eKnowAi.EKnowAiDiySqlMapper;
import com.ys.mapper.eKnowAi.EKnowKnowledgeBaseMapper;
import com.ys.service.eKnowAi.EKnowKnowledgeBaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("eKnowKnowledgeBaseService")
public class EKnowKnowledgeBaseServiceImpl implements EKnowKnowledgeBaseService {

	@Autowired
	private EKnowKnowledgeBaseMapper eKnowKnowledgeBaseMapper;
	@Autowired
	private EKnowAiDiySqlMapper eKnowAiDiySqlMapper;

	@Override
	public int addKnowledgeBase(EKnowKnowledgeBase eKnowKnowledgeBase) {
		int result = eKnowKnowledgeBaseMapper.insert(eKnowKnowledgeBase);
		return result;
	}


	@Override
	public int updateKnowledgeBase(EKnowKnowledgeBase eKnowKnowledgeBase) {
		int result = eKnowKnowledgeBaseMapper.update(eKnowKnowledgeBase);
		return result;
	}


	@Override
	public int delKnowledgeBase(long id) {
		int result = eKnowAiDiySqlMapper.deleteKnowledgeBase(id);
		return result;
	}
}
